#ifndef EFRAMEDANIMATION_H
#define EFRAMEDANIMATION_H

#include "eanimation.h"
#include "../Engine_global.h"

class ETexture;

class ENGINESHARED_EXPORT EFramedAnimation : public EAnimation
{
public:
    EFramedAnimation();

    void reset();
    void update(float dt);

    boost::shared_ptr<ETexture> texture() const;
    QRect currentFrameRect() const;
private:
    boost::weak_ptr<ETexture> m_texture;
    std::vector<QRect> m_frameRects;
    unsigned int m_nCurrentFrame;
};

#endif // EFRAMEDANIMATION_H
